<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="java.util.*"%>
<%@ page import="com.homework.model.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- 包含头部信息用于适应不同设备 -->
<meta name="viewport"
	content="width=device-width, initial-scale=1 user-scalable=no">
<title>管理员界面</title>

<!-- 包含 bootstrap 样式表 -->
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/BootStrap/css/bootstrap.min.css">
<!-- 可选: 包含 jQuery 库 -->
<script
	src="${pageContext.request.contextPath }/BootStrap/js/jquery-2.1.1.min.js"></script>
<script
	src="${pageContext.request.contextPath }/BootStrap/js/bootstrap.min.js"></script>
<script
	src="${pageContext.request.contextPath }/BootStrap/js/jquery-3.1.1.js"></script>

<!--管理员的整体框架-->
<script type="text/javascript">
	/************************************************************************************/
	$(document)
			.ready(
					function() {

						//课程概览
						$("a.allT")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/announcement?method=list");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>公告概览</li>");
										});

						//添加公告
						$("a.addT")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/manager?method=page&to=m_addannouncement");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>添加公告</li>");
										});

						//查看课程
						$("a.courseinfo")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/course?method=page&to=m_courseinfo");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>课程简介</li>");
										});
						//课程简介
						$("a.addsimple")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/course?method=page&to=m_addsimpleinfo");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>课程简介</li>");
										});
						//教师简介
						$("a.addteacherinfo")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/course?method=page&to=m_addteacherinfo");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>教师简介</li>");
										});
						//先导课程
						$("a.addbeforelear")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/course?method=page&to=m_addbeforelear");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>先导课程</li>");
										});
						//教学计划
						$("a.addplan")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/course?method=page&to=m_addplan");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>教学计划</li>");
										});
						//考试方式
						$("a.addexamtype")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/course?method=page&to=m_addexamtype");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>考试方式</li>");
										});
						//参考书目
						$("a.addbooks")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/course?method=page&to=m_addbooks");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>参考书目</li>");
										});

						//上传课件
						$("a.m_addCourseware")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/course?method=page&to=m_addCourseware");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>上传课件</li>");
										});
						//学生概览
						$("a.student")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/student?method=list");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>学生概览</li>");
										});

						//学生分类
						$("a.studentsort")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/class?method=list");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>分类</li>");
										});
						//学生分类add
						$("a.m_addstudentsort")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/class?method=page&to=m_addstudentsort");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>添加分类</li>");
										});
						//录入学生
						$("a.addstudent")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/manager?method=page&to=m_addstudent");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>录入学生</li>");
										});
						//试题概览
						$("a.question")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/question?method=list");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>试题概览</li>");
										});
						//选择题
						$("a.addchoice")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/manager?method=page&to=m_addchoice");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>录入选择题</li>");
										});
						//填空题
						$("a.addblank")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/manager?method=page&to=m_addblank");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>录入填空题</li>");
										});
						//判断题
						$("a.addjudge")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/manager?method=page&to=m_addjudge");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>录入判断题</li>");
										});
						//文件上传
						$("a.addfile")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/manager?method=page&to=m_addfile");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>文件上传题</li>");
										});
						//作业管
						$("a.homework")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/homework?method=list");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>作业概览</li>");
										});
						//布置作业
						$("a.newhomework")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/homework?method=query");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>布置作业</li>");
										});
						//回收站
						$("a.reuse")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/homework?method=reuse");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>布置作业</li>");
										});

						//课程添加
						$("a.addC")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/manager?method=page&to=m_addcourse");
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>课程添加</li>");
										});

						//个人设置
						$("a.m_personalseting")
								.click(
										function() {
											$("iframe")
													.attr("src",
															"${pageContext.request.contextPath }/manager?method=page&to=m_personalseting");//?m_name=${manager.m_name}
											//面包屑导航
											$("ol.breadcrumb")
													.html(
															"<li><a href='javascript:void(0)''>首页</a></li>"
																	+ "<li class='active'>个人设置</li>");
										});

					});
</script>

</head>
<body>

	<%-- <%
		//获取面包屑导航
		List<String> listNav = (List)session.getAttribute("listNav");
		for(int i=0; i<listNav.size(); i++){
			System.out.print("dkjf jdjfjdasfjadsfsdalkjf:"+listNav.get(i));
		}
	%> --%>
	<div class="container-fluid"
		style="background-color: blasck; margin-left: 100px; margin-right: 100px; padding-top: 0px;">
		<div class="row-fluid">
			<div class="span12">
				<!-- 顶部 -->
				<div class="page-header"
					style="margin-top: 0px; height: 42px; clear: all;">
					<h1 class="text-center">
						<strong>作业管理系统</strong>
					</h1>
				</div>

				<!-- 菜单栏 -->
				<nav class="navbar navbar-default" role="navigation">
					<!-- style="background:yellow; -->
					<div class="container-fluid">

						<div class="navbar-header">
							<a class="navbar-brand" href="#"><span
								class="glyphicon glyphicon-pencil" style="font-size: 25px;"></span></a>
						</div>

						<div>
							<ul class="nav navbar-nav">
								<li class="dropdown"><a class="dropdown-toggle"
									data-toggle="dropdown" href="#"> 课程公告<span class="caret"></span>
								</a>
									<ul class="dropdown-menu">
										<li><a href="#" class="allT">公告概览</a></li>
										<li class="divider"></li>
										<li><a href="#" class="addT">添加公告</a></li>
									</ul></li>

								<li class="dropdown"><a class="dropdown-toggle"
									data-toggle="dropdown" href="#"> 课程信息<span class="caret"></span>
								</a>
									<ul class="dropdown-menu">
										<li><a href="#" class="courseinfo">查看课程</a></li>
										<li><a href="#modal-container-1" data-toggle="modal"
											style="clear: both;">添加课程</a></li>
										<li class="divider"></li>
										<li><a href="#" class="addsimple">课程简介</a></li>
										<li><a href="#" class="addteacherinfo">教师简介</a></li>
										<li><a href="#" class="addbeforelear">先导课程</a></li>
										<li><a href="#" class="addplan">教学计划</a></li>
										<li><a href="#" class="addexamtype">考试方式</a></li>
										<li><a href="#" class="addbooks">参考书目</a></li>
										<li><a href="#" class="m_addCourseware">上传课件</a></li>
									</ul></li>

								<li class="dropdown"><a class="dropdown-toggle"
									data-toggle="dropdown" href="#"> 学生管理<span class="caret"></span>
								</a>
									<ul class="dropdown-menu">
										<li><a href="#" class="student">学生概览</a></li>
										<li class="divider"></li>
										<li><a href="#" class="studentsort">分类概览</a></li>
										<li><a href="#" class="m_addstudentsort">添加分类</a></li>
										<li><a href="#" class="addstudent">学生录入</a></li>
									</ul></li>
								<li class="dropdown"><a class="dropdown-toggle"
									data-toggle="dropdown" href="#"> 作业题库<span class="caret"></span>
								</a>
									<ul class="dropdown-menu">
										<li><a href="#" class="question">试题概览</a></li>
										<li class="divider"></li>
										<li><a href="#" class="addchoice">录入选择题</a>
										<li><a href="#" class="addblank">录入填空题</a>
										<li><a href="#" class="addjudge">录入判断题</a>
										<li><a href="#" class="addfile">文件上传题</a>
										<li class="divider"></li>
										<li><a href="#" class="homework">作业管理</a></li>
										<li><a href="#" class="newhomework">布置作业</a></li>
										<li><a href="#" class="reuse">回收站</a></li>
									</ul>
							</ul>
						</div>

						<form class="navbar-form navbar-left" role="search">
							<div class="form-group">
								<input type="text" class="form-control" placeholder="Search">
							</div>
							<button type="button" class="btn btn-default">
								<span class="glyphicon glyphicon-search"></span>
							</button>
						</form>

						<ul class="nav navbar-nav navbar-right">
							<li>
								<!-- <a href="#"><span class="glyphicon glyphicon-envelope" style="font-size: 20px;"></a> -->
								<img src="${pageContext.request.contextPath }/img/header.gif"
								class="img-circle" style="width: 40px; height: 40px;">
							</li>
							<li><strong><span style="line-height: 55px;">管理员:&nbsp;${user.name  }</span></strong></li>
							<li class="dropdown"><a href="#" class="dropdown-toggle"
								data-toggle="dropdown"> <span
									class="glyphicon glyphicon-user" style="font-size: 20px;"></span>
									<strong class="caret"></strong>
							</a>
								<ul class="dropdown-menu">
									<li><a href="#">管理员:&nbsp;${user.name  } </a></li>
									<li><a href="#" class="m_personalseting">个人设置</a></li>
									<li class="divider"></li>
									<li><a href="logout"><span
											class="glyphicon glyphicon-off"></span>注 销</a></li>
								</ul></li>
						</ul>

					</div>
				</nav>
				<div class="container-fluid">
					<div class="modal fade" id="modal-container-1" role="dialog"
						aria-labelledby="myModalLabel" aria-hidden="true">
						<div class="modal-dialog">
							<div class="modal-content">
								<div class="modal-header">
									<button type="button" class="close" data-dismiss="modal"
										aria-hidden="true">×</button>
									<h4 class="modal-title" id="myModalLabel">添加课程</h4>
								</div>
								<form
									action="${pageContext.request.contextPath }/course?method=add&field=course"
									method="post">
									<div class="modal-body">
										<input type="hidden" name="id" value="${student.id }" />
										<!--修改内容提示  -->
										<input type="hidden" name="s_account"
											value="${student.s_account }" /> <input type="hidden"
											name="s_password" value="${student.s_password }" /> <input
											type="hidden" name="s_c_id" value="${student.s_c_id }" /> <input
											type="hidden" name="s_sex" value="${student.s_sex }" /> <input
											type="hidden" name="s_dept" value="${student.s_dept }" />
										课程名:&nbsp;<input type="text" name="name"
											value="${student.s_name }"> <br> <br>
										班&nbsp;&nbsp;级::&nbsp; <select class="combobox" name="classid">
											<c:if test="${!empty classList}">
												<c:forEach items="${classList}" var="s">
													<option value="${s.classid }" name="classid">${s.classname }</option>
												</c:forEach>
											</c:if>
										</select>
									</div>
									<div class="modal-footer">
										<button type="button" class="btn btn-default"
											data-dismiss="modal">关闭</button>
										<button type="submit" class="btn btn-primary">添加</button>
										<button type="reset" id="reset" class="btn btn-primary">重置</button>
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>
				<!--面包屑导航-->
				<ol class="breadcrumb">
					<li><a href="javascript:void(0)">主页</a></li>
				</ol>
				<hr>

				<!--iframe框架内容-->
				<div class="row-fluid">
					<!--m_teachermanage.html   -->
					<div class="span12">
						<div style="height: 1000px;">
							<!-- seamless="seamless" 无边框或滚动条 -->
							<iframe
								src="${pageContext.request.contextPath }/announcement?method=list"
								frameborder="0" seamless="seamless" marginheight="0px"
								marginwidth="0px" width="100%" height="100%""></iframe>

						</div>
					</div>
				</div>
				<%-- <jsp:forward page="m_teachermanage.jsp"></jsp:forward> --%>

				<!--脚部地址-->
				<div class="text-center" style="margin-top: 30%;">
					<hr />
					<address>2019-2020学年第二学期《JSP程序设计》期末大作业</address>
				</div>


			</div>
		</div>
	</div>

</body>
</html>